package Server.map;

public class Vegetable extends Food{

	public Vegetable(int energy, int maxEnergy){
		super(energy, maxEnergy);
	}
	public Vegetable(Vegetable v){
		super(v);
	}
	@Override
	public boolean isMeat() {

		return false;
	}

	@Override
	public void update() {
		if (this.energy < this.maxEnergy){
			int newEnergy = this.energy += this.energy / 10;
			if (newEnergy > this.maxEnergy){
				this.energy = this.maxEnergy;
			} else {
				this.energy = newEnergy;
			}
		}
	}
}
